#ifndef SOCKETCLIENT_H
#define SOCKETCLIENT_H

#include <QObject>
#include <QTcpSocket>

enum ssl_type{
    SSL_INFO = 0,
    SSL_RSA ,
    SSL_SM2
};

class SocketClient : public QObject
{
    Q_OBJECT
public:
    //explicit SocketClient(QObject *parent = nullptr);
    explicit SocketClient(const QString _hostName, const quint16 _port, QObject *parent = nullptr);

    void login(void);
    void logout(void);
    void UTC(void);
    void report(void);
    void report_later(void);
    void upload(void);
    static void set_ssl(const enum ssl_type _ssl)
    {
        ssl = _ssl;
    }


signals:

public slots:

private slots:
    void connected();
    void readyRead();
    void error(QAbstractSocket::SocketError socketError);

private:
    //static QTcpSocket *socket;
    static enum ssl_type ssl;

};

#endif // SOCKETCLIENT_H
